tools/pygrub: Fix default when out of range
authorIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 29 Jun 2010 15:23:13 +0000 (16:23 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 29 Jun 2010 15:23:13 +0000 (16:23 +0100)
commit4b544ba5353aa6779d3ef20a2ae470b1b851a3c5
tree13e485d48d1cece4c9e60b730a1f6d5052995b25
parentfa5685207c8154381186f328cd7b96ace04de7ee
tools/pygrub: Fix default when out of range

This is the patch to fix pyGrub default value when it's being set out of
range. This patch makes the quiet and interactive mode select the same
default image when the default value for boot entry is out of range,
i.e. when the guest is having wrong configuration in it's boot loader
(like 3 entries with default mistakenly set to 10 etc).

When the boot entry number is being set out of range it falls back to 0
(first entry of boot loader).

Signed-off-by: Michal Novotny <minovotn@redhat.com>
tools/pygrub/src/pygrub